package com.Tjise.JAVAzuoye2;

public class SalariedEmployee extends ColaEmployee {
    double monsalary;

    public SalariedEmployee(double salary) {
        this.monsalary = salary;
    }

    public SalariedEmployee(String name, int birthday, double salary) {
        super(name, birthday);
        this.monsalary = salary;
    }

    public double getMonsalary() {
        return monsalary;
    }

    public void setMonsalary(double monsalary) {
        this.monsalary = monsalary;
    }

    @Override
    public double getSalary(int birthday) {
        if (super.getBirthday() == birthday) {
            return monsalary+100;
        }else {
            return monsalary;
        }
    }
}
